home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libxml.idb / usr / freeware / bin / xml-config.z / xml-config
Encoding:
Text File  |  1999-07-16  |  987 b   |  72 lines

  1. #! /bin/sh
  2.  
  3. prefix=${ROOT}/usr/freeware
  4. exec_prefix=${prefix}
  5. includedir=${prefix}/include
  6.  
  7. usage()
  8. {
  9.     cat <<EOF
  10. Usage: xml-config [OPTION]
  11.  
  12. Known values for OPTION are:
  13.  
  14.   --prefix=DIR        change libxml prefix [default $prefix]
  15.   --libs        print library linking information
  16.   --cflags        print pre-processor and compiler flags
  17.   --help        display this help and exit
  18.   --version        output version information
  19. EOF
  20.  
  21.     exit $1
  22. }
  23.  
  24. if test $# -eq 0; then
  25.     usage 1
  26. fi
  27.  
  28. cflags=false
  29. libs=false
  30.  
  31. while test $# -gt 0; do
  32.     case "$1" in
  33.     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  34.     *) optarg= ;;
  35.     esac
  36.  
  37.     case "$1" in
  38.     --prefix=*)
  39.     prefix=$optarg
  40.     ;;
  41.  
  42.     --prefix)
  43.     echo $prefix
  44.     ;;
  45.  
  46.     --version)
  47.     echo libxml 1.3.0
  48.     exit 0
  49.     ;;
  50.  
  51.     --help)
  52.     usage 0
  53.     ;;
  54.  
  55.     --cflags)
  56.            echo -I${prefix}/include/gnome-xml
  57.            ;;
  58.  
  59.     --libs)
  60.            echo -L${ROOT}/usr/freeware/${ABILIB-lib32} -lxml -lz
  61.            ;;
  62.  
  63.     *)
  64.     usage
  65.     exit 1
  66.     ;;
  67.     esac
  68.     shift
  69. done
  70.  
  71. exit 0
  72.